package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.StrategyDetail;
import cn.wolfcode.luowowo.article.query.StrategyDetailQuery;
import cn.wolfcode.luowowo.article.vo.StrategyStatisPersistenceVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    int updateByPrimaryKey(StrategyDetail record);

    List<StrategyDetail> selectForList(StrategyDetailQuery qo);

    /**
     * 维护关系
     * @param id
     * @param id1
     */
    void insertRelation(@Param("detailId") Long id, @Param("tagId") Long id1);

    /**
     * 打破关系
     * @param detailId
     */
    void deleteRelation(Long detailId);

    /**
     * 查询前三个
     * @param destId
     * @return
     */
    List<StrategyDetail> selectByViewNumTop3(Long destId);

    /**
     *
     * @param pvo
     */
    void updateStrategyStatisVO(StrategyStatisPersistenceVO pvo);
}